package com.ruoyi.project.propertySystem.mapper;

import java.util.List;

import com.ruoyi.project.propertySystem.domain.InspectClassify;
import com.ruoyi.project.propertySystem.domain.InspectItemRecord;
import com.ruoyi.project.propertySystem.domain.vo.InspectItemRecordVO;
import com.ruoyi.project.propertySystem.domain.vo.InspectRecordVO;
import com.ruoyi.project.query.InspectRecordQuery;
import org.apache.ibatis.annotations.Param;

/**
 * 巡检项记录Mapper接口
 *
 * @author wangshuo
 * @date 2021-01-18
 */
public interface InspectItemRecordMapper {
    /**
     * 查询巡检项记录
     *
     * @param id 巡检项记录ID
     * @return 巡检项记录
     */
    public InspectItemRecord selectInspectItemRecordById(Long id);

    /**
     * 查询巡检项记录列表
     *
     * @param inspectItemRecord 巡检项记录
     * @return 巡检项记录集合
     */
    public List<InspectItemRecord> selectInspectItemRecordList(InspectItemRecord inspectItemRecord);

    /**
     * 新增巡检项记录
     *
     * @param inspectItemRecord 巡检项记录
     * @return 结果
     */
    public int insertInspectItemRecord(InspectItemRecord inspectItemRecord);

    /**
     * 修改巡检项记录
     *
     * @param inspectItemRecord 巡检项记录
     * @return 结果
     */
    public int updateInspectItemRecord(InspectItemRecord inspectItemRecord);

    /**
     * 删除巡检项记录
     *
     * @param id 巡检项记录ID
     * @return 结果
     */
    public int deleteInspectItemRecordById(Long id);

    /**
     * 批量删除巡检项记录
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteInspectItemRecordByIds(Long[] ids);

    List<InspectRecordVO> selectInspectClassifyByRecordId(Long recordId);

    int batchInsert(@Param("inspectItemRecords") List<InspectItemRecord> inspectItemRecords);

    List<InspectItemRecordVO> getInspectItemsByClassifyAndRecordId(@Param("classifyId") Long classifyId, @Param("inspectRecordId") Long inspectRecordId);

    List<InspectItemRecord> getUnInspectItemByRecordId(Long inspectRecordId);

    List<InspectItemRecordVO> getUserInspectRecordClassifyList(InspectRecordQuery inspectRecordQuery);

    List<InspectItemRecordVO> getUserInspectRecordItemByClassify(@Param("classifyId") Long classifyId, @Param("inspectRecordId") Long inspectRecordId);
}
